package com.mercury.ec.module.air.controller.admin.demandorder.vo.demandroutesegment;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mercury.ec.framework.excel.core.annotations.DictFormat;
import com.mercury.ec.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.mercury.ec.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 机票需求订单方案行程航段 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AirDemandRouteSegmentRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32382")
    private Long id;

    @Schema(description = "需求订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23189")
    private Long demandId;

    @Schema(description = "方案id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23288")
    private Long demandSchemeId;

    @Schema(description = "行程id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23615")
    private Long demandRouteId;

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("序号")
    private Integer serialNo;

    @Schema(description = "航司代码")
    @ExcelProperty("航司代码")
    private String airlineNo;

    @Schema(description = "航班号")
    @ExcelProperty("航班号")
    private String flightNo;

    @Schema(description = "舱位")
    @ExcelProperty("舱位")
    private String cabin;

    @Schema(description = "出发机场三字码")
    @ExcelProperty("出发机场三字码")
    private String depart;

    @Schema(description = "抵达机场三字码")
    @ExcelProperty("抵达机场三字码")
    private String arrive;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @Schema(description = "航班日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("航班日期")
    private LocalDate flightDate;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @Schema(description = "抵达日期")
    @ExcelProperty("抵达日期")
    private LocalDate arriveDate;

    @Schema(description = "出发时间(HH:mm)")
    @ExcelProperty("出发时间")
    private String departTime;

    @Schema(description = "抵达时间(HH:mm)")
    @ExcelProperty("抵达时间")
    private String arriveTime;

    @Schema(description = "出发航站楼")
    @ExcelProperty("出发航站楼")
    private String departTerminal;

    @Schema(description = "抵达航站楼")
    @ExcelProperty("抵达航站楼")
    private String arriveTerminal;

    @Schema(description = "机型")
    @ExcelProperty("机型")
    private String airModel;

    @Schema(description = "是否经停")
    @ExcelProperty(value = "是否经停", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean stop;

    @Schema(description = "经停机场三字码")
    @ExcelProperty("经停机场三字码")
    private String stopAirportNo;

    @Schema(description = "经停航站楼")
    @ExcelProperty("经停航站楼")
    private String stopTerminal;

    @Schema(description = "是否共享航班")
    @ExcelProperty(value = "是否共享航班", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean share;

    @Schema(description = "行李额")
    @ExcelProperty("行李额")
    private String baggageWeight;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String creator;
}
